import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import './dialogend.css'
import { AtTabs, AtTabsPane, AtAvatar, AtListItem, AtList, AtButton, AtInput, Image } from 'taro-ui'
import {$redirectTo,getGlobalData} from '../../../global'

export default class DialogEnd extends Component {

    config = {
        navigationBarTitleText: '刘季级医生'
    }
    constructor() {
        super(...arguments)
        this.state = {
            current: 0,
            value: ''
        }
    }
    handleClick(value) {
        this.setState({
            current: value
        })
    }
    handleChange(value) {
        this.setState({
            value
        })
    }
    zixunjilu=()=>{
        app.redirectTo("../dialogend.3/dialogend")
    }
    componentWillMount() { }

    componentDidMount() { }

    componentWillUnmount() { }

    componentDidShow() { }

    componentDidHide() { }

    render() {
        return (
            <View className='dialog-end'>
                        <View className='header at-row'>
                            <View className='at-col at-col-6 selected' >在线咨询</View>
                            <View onClick={this.zixunjilu} className='at-col at-col-6' >咨询记录</View>
                        </View>
                        <View className='time'>17:20</View>
                        <View className='dialog'>
                            <AtAvatar className='dialog-head all-float'  circle={true}  size='small' image={getGlobalData('baseurl')+'img/d1.jpg'}></AtAvatar>
                            <View className='dialog-text all-float'>
                                <View className='hi'>你好，很高兴为你提供帮助</View>
                                <AtList className='list-box' hasBorder={false}>
                                    <AtListItem title='孙雪' extraText='擅长' arrow='right' hasBorder={false} />
                                    <AtListItem title='眼科，主治医师' hasBorder={false} />
                                    <AtListItem title='广东省第一人民人民医院' hasBorder={false} />
                                </AtList>
                            </View>
                        </View>
                        <View className='tips'>温馨提示：在线咨询不能作为诊断依据</View>
                        <View className='dialog'>
                            <AtAvatar className='dialog-head left-float ' circle={true}  size='small' image={getGlobalData('baseurl')+'img/d2.jpg'}></AtAvatar>
                            <View className='dialog-text left-float'>
                                <View className='hi hi-two'>你好，请问我现在的病情的问题究竟是怎么样</View>
                            </View>
                        </View>                    
                <View className='blank-box'></View>
                <View className='send'>
                            <AtInput
                                name='value'
                                type='text'
                                value={this.state.value}
                                onChange={this.handleChange.bind(this)}
                                className='input'
                            />
                            <Image src={getGlobalData('baseurl')+'img/send.png'} className='send-btn'></Image>
                            <Image src={getGlobalData('baseurl')+'img/tianjiabingli.png'} className='add-btn'></Image>
                        </View>
            </View>
        )
    }
}

